#ifndef QUEQUE_H_
#define QUEQUE_H_

#include "user_configure.h"
#include "net_manage.h"

#define MESSAGE_WAIT 0
#define MESSAGE_SUCCESS 1
#define MESSAGE_FAIL 2
#define MESSAGE_SEND_FAIL 3

typedef struct {
	uint8 status;
	uint8 message_id;
	uint8 timeout;
	uint8 from_source;
	uint16 dst_addr;
	AF_message* message_content;
}message_queue;

#define QUEUE_MAX 10

extern void message_queue_init(void);
extern uint8 message_queue_register(AF_message*message_content,uint16 dst_addr,uint8 from_source);
extern void del_mesaage_poor(uint8 location);
#endif
